<%--
  Created by IntelliJ IDEA.
  User: 羡羡
  Date: 2021/11/3
  Time: 15:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>登入</title>
    <link rel="stylesheet" href="/SSMLifePlan/css/normalize.min.css">
    <link rel="stylesheet" href="/SSMLifePlan/css/style.css">
    <script src="/SSMLifePlan/js/jquery-1.10.2.js"></script>
    <link rel="stylesheet" href="/SSMLifePlan/layui/css/layui.css">
    <script src="/SSMLifePlan/layui/layui.js"></script>
    <script>
        $(function() {
            var er=$("#heiderr").val();
            if(er==""){
                console.log("error null!");
            }else{
                layer.msg("账号或密码错误！");
            }
            //获取焦点时 变成日期框
            $("#cf").focus(function() {
                $("#cf").attr("type","date");
            });
            //失去焦点时 变成文本框
            $("#cf").blur(function() {
                $("#cf").attr("type","text");
            });
        })
    </script>
</head>
<body>
<div id="formContainer" class="dwo">
    <input value="${sessionScope.error}" type="hidden" id="heiderr"/>
    <div class="formLeft">
        <h1>人<br>生<br>计<br>划</h1>
    </div>
    <div class="formRight">
        <!-- Forgot password form -->
        <form id="forgot" class="otherForm">
            <header>
                <h1>忘记密码</h1>
                <p>输入邮箱找回密码</p>
            </header>
            <section>
                <label>
                    <p>邮箱</p>
                    <input type="email" placeholder=" ">
                    <div class="border"></div>
                </label>
                <button type="submit">发送邮件</button>
            </section>
            <footer>
                <button type="button" class="forgotBtn">返回</button>
            </footer>
        </form>

        <!-- Login form -->
        <form id="login" action="login" method="post">
            <header>
                <h1>欢迎回来</h1>
                <p>请先登录</p>
            </header>
            <section>
                <label>
                    <p>用户名</p>
                    <input type="text" placeholder=" " name="name">
                    <div class="border"></div>
                </label>
                <label>
                    <p>密码</p>
                    <input type="password" placeholder=" " name="pass">
                    <div class="border"></div>
                </label>
                <button type="submit">登 录</button>
            </section>
            <footer>
                <button type="button" class="forgotBtn">忘记密码？</button>
                <button type="button" class="registerBtn">新用户？</button>
            </footer>
        </form>

        <!-- Register form -->
        <form id="register" class="otherForm" action="regit" method="post">
            <header>
                <h1>用户注册</h1>
                <p>注册后享受更多服务</p>
            </header>
            <section>
                <label>
                    <p>用户名</p>
                    <input type="text" placeholder=" " required name="user">
                    <div class="border"></div>
                </label>
                <label>
                    <p>生日</p>
                    <input type="text" placeholder=" " id="cf" required name="birthday"/>
                    <div class="border"></div>
                </label>
                <label>
                    <p>真实姓名</p>
                    <input type="text" placeholder=" " required name="name">
                    <div class="border"></div>
                </label>
                <label>
                    <p>密码</p>
                    <input type="password" placeholder=" " required name="pass">
                    <div class="border"></div>
                </label>
                <input type="hidden" name="img" value="https://sls-study-cloud-1301165591.cos.ap-guangzhou.myqcloud.com/1636273382031.jpg"/>
                <button type="submit">注 册</button>
            </section>
            <footer>
                <button type="button" class="registerBtn">返回</button>
            </footer>
        </form>
    </div>
</div>
<script src="/SSMLifePlan/js/jquery.min.js"></script>
<script src="/SSMLifePlan/js/script.js"></script>
</body>
</html>
